﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonExtensions.ObjectExtensions;

namespace CommonExtensions.IListExtensions
{
    public static class Extensions
    {
        public static void AddRange<T>(this IList<T> list, IEnumerable<T> collection)
        {
            if(list.IsNull())
                throw new ArgumentNullException("list");
            if(collection.IsNull())
                throw new ArgumentNullException("collection");

            foreach (T item in collection)
            {
                list.Add(item);
            }
        }
    }
}
